﻿using System;

namespace _2DArray
{
    class Program
    {
        static void Main(string[] args)
        {
            // Declare a single-dimensional array  
            int[] array1 = new int[5];

            // Declare and set array element values 
            int[] array2 = new int[] { 1, 3, 5, 7, 9 };

            // Alternative syntax 
            int[] array3 = { 1, 2, 3, 4, 5, 6 };

            // Declare a two dimensional array 
            // # # #
            // # # #
            int[,] multiDimensionalArray1 = new int[2, 3];

            // Declare and set array element values 
            int[,] multiDimensionalArray2 = 
            { 
                { 1, 2, 3 }, 
                { 4, 5, 6 }
            };


            string[,] chessBoard = new string[8, 8];
            /*
            {
                // 00    01    02   
                { "A8", "B8", "C8", "D8", "E8", "F8", "G8", "H8" },
                // 10    11    12
                { "A7", "B7", "C7", "D7", "E7", "F7", "G7", "H7" },
            };
            */

            for (int i = 7; i >= 0; i--)
            {
                for (int j = 0; j < 8; j++)
                {
                    chessBoard[7 - i, j] = (char)(j + 65) + (i + 1).ToString();
                }
            }

            for (int i = 0; i < 8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    Console.Write(chessBoard[i,j] + "\t");
                }
                Console.Write("\n\n\n");
            }

            Console.ReadKey();
        }
    }
}
